package com.lee.app.controller;

        import com.lee.app.entity.UserNo;
        import com.lee.app.service.UserNoService;
        import com.lee.app.util.JacksonUtil;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.bind.annotation.RequestMapping;
        import org.springframework.web.bind.annotation.RestController;

/**
 * @author Lee
 */
@RestController
@RequestMapping("api/user-no")
public class UserNoController {

    @Autowired
    private UserNoService userNoService;

    @RequestMapping("select-by-status")
    public String selectByStatus(Integer status) {
        UserNo userNo = userNoService.selectByStatus(status);
        if (userNo != null) {
            return JacksonUtil.build(userNo);
        } else {
            return JacksonUtil.build(0, "查询失败");
        }
    }

}
